package com.dg.cuckoo.admin.repository;

import com.dg.cuckoo.admin.dto.projectDeclare.oneProDeclare.BuildDeclareDto;
import com.dg.cuckoo.core.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BuildDeclareRepository extends BaseRepository<BuildDeclareDto,String> {

    BuildDeclareDto findByProjectName(String projectName);

    @Query(value = "select * from build_declare limit ?,?",nativeQuery = true)
    List<BuildDeclareDto> page(Integer page, Integer pageSize);

    List<BuildDeclareDto> findByBeginYear(String year);

    List<BuildDeclareDto> findByUnit(String unit);

}
